/*
package com.aaa.come.controller;


import com.aaa.come.entity.OutorderDetail;
import com.aaa.come.service.OutorderDetailService;
import com.aaa.vo.R;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

*/
/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author aaa
 * @since 2020-11-26
 *//*

@RestController
@RequestMapping("/come/outorder-detail")
@Api(description = "订单详情录入")
public class OutorderDetailController2 {

    @Autowired
    private OutorderDetailService outorderDetailService;

    @PostMapping("insertOutorderDetail")
    @ApiOperation(value = "出库订单录入明细，新增订单明细中的商品")
    public R insertOutorderDetail(@ApiParam("传入包装类") @RequestBody OutorderDetail outorderDetail){
        if (outorderDetailService.findById(outorderDetail.getCommoditybar())){
            boolean save = outorderDetailService.save(outorderDetail);
            if (save){
                return R.ok().message("新增成功");
            }else {
                return R.error().message("新增失败");
            }
        }else{
            boolean save=outorderDetailService.updateOutorderDetail(outorderDetail);
            if (save){
                return R.ok().message("新增成功");
            }else {
                return R.error().message("新增失败");
            }
        }

    }

    @PostMapping("findPageOutorderDetail/{page}/{size}/{pid}")
    @ApiOperation(value = "根据出库单号查询出库订单的商品明细")
    public R findPageOutorderDetail(@ApiParam("页数") @PathVariable Integer page,
                                    @ApiParam("一页几条数据") @PathVariable  Integer size,
                                    @ApiParam("查询条件（根据id查询）") @PathVariable Integer pid){
        try{
            Page<OutorderDetail> pageinfo=outorderDetailService.findPageOutorderDetail(page,size,pid);
            return R.ok().data("data",pageinfo);
        }catch (Exception e){
            e.printStackTrace();
            return R.error().message("查询失败");
        }

    }

}

*/
